package com.lm.basic;

import javax.servlet.ServletOutputStream;
import java.io.IOException;

/**
 * @Auther: Min.Liu
 * @Description:
 * @Date: Created in 9:36 2025/3/13
 */
public class LmServletOutputStream extends ServletOutputStream {
    private byte[] bytes = new byte[1024];
    private int pos = 0;

    @Override
    public void write(int b) throws IOException {
        bytes[pos] = (byte)b;
        pos++;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public int getPos() {
        return pos;
    }
}
